#ifndef CHATLISTITEM_H
#define CHATLISTITEM_H

#include <QWidget>
#include <QStringLiteral>
#include "Models/friend.h"

namespace Ui {
class ChatListItem;
}

class ChatListItem : public QWidget
{
    Q_OBJECT

public:
    explicit ChatListItem(QWidget *parent = nullptr);
    ~ChatListItem();

    void Selected(bool selected);
    void Checked(bool checked);

    void item(Friend *data);
    Friend *item();

private:
    Ui::ChatListItem *ui;
    Friend *data;
    bool isSelected;

    void mousePressEvent(QMouseEvent *event);
    void enterEvent(QEvent *event);
    void leaveEvent(QEvent *event);

signals:
    void selected(ChatListItem *item);
};
Q_DECLARE_METATYPE(ChatListItem*)
#endif // CHATLISTITEM_H
